package com.kyxx.topics.bean;

import com.kyxx.topics.utils.StringUtil;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/10/11.
 */
public class CommentBean implements Serializable {

    /**
     * id : 1
     * pid : 0
     * aid : 31
     * content : 急急急急急急
     * nickname : null
     * avatar : null
     * uid : 11
     * zan : 0
     * addtime : 1476157610
     * status : 0
     * children : [{"id":"8","pid":"1","aid":"31","content":"sfasdfadfadsfas","nickname":"18253986613","avatar":null,"uid":"11","zan":"0","addtime":"1476168700","status":0}]
     */

    private String id;
    private String pid;
    private String aid;
    private String content;
    private String nickname;
    private String avatar;
    private String uid;
    private String zan;
    private String addtime;
    private int status;
    private String child_count;
    /**
     * id : 8
     * pid : 1
     * aid : 31
     * content : sfasdfadfadsfas
     * nickname : 18253986613
     * avatar : null
     * uid : 11
     * zan : 0
     * addtime : 1476168700
     * status : 0
     */

    private List<CommentBean> children = new ArrayList<>();

    public String getChild_count() {
        return child_count;
    }

    public void setChild_count(String child_count) {
        this.child_count = child_count;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getAid() {
        return aid;
    }

    public void setAid(String aid) {
        this.aid = aid;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getNickname() {
        if (StringUtil.isMobileExact(nickname)) {
            return StringUtil.transferPhone(nickname);
        }
        return nickname;
    }

    public void setNickname(String nickname) {
        if (StringUtil.isMobileExact(nickname)) {
            this.nickname = StringUtil.transferPhone(nickname);
        } else {
            this.nickname = nickname;
        }

    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getZan() {
        return zan;
    }

    public void setZan(String zan) {
        this.zan = zan;
    }

    public String getAddtime() {
        return addtime;
    }

    public void setAddtime(String addtime) {
        this.addtime = addtime;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public List<CommentBean> getChildren() {
        return children;
    }

    public void setChildren(List<CommentBean> children) {
        this.children = children;
    }
}
